import http from '../utils/http'
// 获取公告列表
export const getNoticeList = ()=>{
  return http({
    method:"GET",
    url:"/user/notice/list"
  })
}
//获取我的课程
export const getMyCourse = ()=>{
  return http({
    method:"GET",
    url:"/user/course/myCourse"
  })
}
//获取推荐和我的课程
export const getRecommendCourse = (data?:{
  isRecommend?:string,
  schoolId?:number,
  search?:string
})=>{
  return http({
    method:"GET",
    url:"/user/course/recommendCourse",
    data
  })
}
// 获取消息列表
export const getNoticeInfoList =(data:{
  type:string,
  userId?:number
})=>{
  const type = getApp().getUserType()
  return http({
    method:"GET",
    url:`/${type === "01"? "teacher" : "user"}/noticepush/list`,
    data
  })
}
// 获取用户弹框消息
export const getDialogNotice =(data:{
  userId?:number
})=>{
  return http({
    method:"GET",
    url:"/user/noticepush/dialogNotice",
    data
  })
}
// 消息不提醒
export const noticeNotRemind =(smallType:string)=>{
  return http({
    method:"POST",
    url:`/user/noticepush/notRemind?smallType=${smallType}`,
  })
}
// /user/noticepush/notRemind